﻿<!doctype html>
<html>
    <head>
        
        <meta charset="UTF-8" />
				<title>radio bug in ie6</title>
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
    </head>
    <body>
    	
    	<p>ie6下 -- 下面按钮不起作用(ie7,8未测试)</p>
    	<button id="test">选中第二个radio</button>
    	
    	
    	
<div id="dialog" title="模板选择" >	
	 <input type="radio" name="template" value="1" />
	 <input type="radio" name="template" value="2" id="testRadio" />
	 <input type="radio" name="template" value="3" /> 
</div>
<script>
$(function(){
	 $("#dialog input:radio").attr("checked", false);
   $("#test").click(function(){
    		$("#dialog input:radio[value=" + "2" + "]").attr("checked", true); 
    		//或者$("#testRadio").appendTo("body");
    		$("#dialog").appendTo("body");
        $("#dialog").css({
        	display:""
        });
   });
});
</script>
</body>
</html>